package yxy.game.pm2.command.guard;

import yxy.cherry.game.base.message.annotation.MessageSource;
import yxy.cherry.game.base.message.annotation.MessageType;
import yxy.game.pm2.command.Command;
import yxy.game.pm2.message.GuardMessage;
import yxy.game.pm2.module.guard.GuardHandle;

/** 洛阳守卫 洛阳守卫消息订阅 */
@MessageType(proto = Command.GuardSub, classtype = GuardMessage.GuardSubRequest.class)
public class CMD_GuardSub extends Command<GuardMessage.GuardSubRequest> {

	@Override
	public void execute(MessageSource messageSource, GuardMessage.GuardSubRequest request) {
		String playerCode = messageSource.getTag();

//		GuardMessage.GuardSubResponse.Builder response = GuardMessage.GuardSubResponse.newBuilder();

		new GuardHandle().subscriber(playerCode);

//		send(messageSource, response, Result.Success);
	}

//	private void send(MessageSource messageSource, GuardMessage.GuardSubResponse.Builder response, Result result) {
//		response.setResult(result.packResult());
//		MessageEmitterHandler.getInstance().send(messageSource, response.build());
//	}
}